﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin_QuanLyLoaiSanPham : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void ListView1_SelectedIndexChanging(object sender, ListViewSelectEventArgs e)
    {
        ListView1.SelectedIndex = e.NewSelectedIndex;
        int k = ListView1.SelectedIndex;

        DataKey currentDataKey = this.ListView1.DataKeys[k];

        string update_url = "ChiTietLoaiSanPham.aspx?ma=" + (string)currentDataKey["IDLoaiTL"].ToString();
        Response.Redirect(update_url);

    }

    public string format_text(string i)
    {
        string aa = "";

        if (i.CompareTo("0") == 0)
            aa = "Soft";
        else

            aa = "Hard";

        return aa;
    }
}